package com.group.Service.Impl;

import com.group.DAO.UserInfoDAO;
import com.group.Enity.User;
import com.group.Service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserInfoServiceImpl implements UserInfoService
{
    @Autowired
    private UserInfoDAO userInfoDAO;

    public List<User> getUsers(String type){

        return userInfoDAO.getUsers(type);

    }

    @Override
    public User getUser(int id) {
        return userInfoDAO.getUser(id);
    }

    @Override
    public void add(User user) {
        userInfoDAO.add(user);
    }

    @Override
    public void delete(int id) {
        userInfoDAO.delete(id);
    }

    @Override
    public void update(User user) {
        userInfoDAO.update(user);
    }
}
